package cn.wolfcode.mapper;

import cn.wolfcode.domain.Exam;
import cn.wolfcode.domain.ExamQuestion;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExamMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Exam record);

    Exam selectByPrimaryKey(Long id);

    List<Exam> selectAll();

    int updateByPrimaryKey(Exam record);

    List<Exam> selectForList(QueryObject qo);

    int queryQuestionCount(Integer type);

    List<Long> queryByQuestion(@Param("type") Integer type, @Param("number") Integer number);

    void saveRelation(ExamQuestion examQuestion);

    void deleteRelation(Long examId);
}